<template>
  <div>
    <van-nav-bar :title="activeTitle" fixed />

    <router-view></router-view>
    <van-tabbar @change="onChange">
      <van-tabbar-item replace name="首页" to="/layout/home" icon="home-o"
        >首页</van-tabbar-item
      >
      <van-tabbar-item replace name="搜索" to="/layout/search" icon="search"
        >搜索</van-tabbar-item
      >
    </van-tabbar>
  </div>
</template>


<script>
export default {
  data() {
    return {
      activeTitle: "首页",
    };
  },
  methods: {
    onChange(name) {
      this.activeTitle = name;
    },
  },
};
</script>


<style>
</style>